import { R } from '@/entity/R'
import { spot } from '@/entity/spot'
import { createAPI } from '@/utils/request'


// 获取轮播图
export async function getBannerList(): Promise<R> {
  const { data } = await createAPI('/spot/bannerList', 'get', null, null)
  return data
}


// 获取商品详情
export async function getSpotsList(currentPage: number, pageSize: number, SpotQueryCondition: spot | any): Promise<R> {
  const { data } = await createAPI(`/spot/${currentPage}/${pageSize}`, 'post', null, SpotQueryCondition)
  return data
}